export default {
  // 导出混入对象
  data() {
    return {};
  },
  methods: {
    cellClick(row, column, cell, event) {
      const KEY = `Flag-${row.index}-${column.property}`;
      this.$set(row, KEY, true);
      this.$nextTick(() => {
        const input = cell.querySelector('#input') ? true : false;
        const select = cell.querySelector('#selet') ? true : false;
        if (input) this.$refs[KEY].focus();
        if (select) this.$refs[KEY].focus();
      });
    },

    blur(row, key, isSelect) {
      if (isSelect) {
        setTimeout(() => {
          this.$set(row, key, false);
        }, 100);
      } else {
        this.$set(row, key, false);
      }
    },

    returnLable(value, options) {
      for (let i = 0; i < options.length; i++) {
        if (value == options[i].value) {
          return options[i].label;
        }
      }
    },
  },
};
